procedure GetDataNumber(dataName : Str255; x,y : longint; var pixel : real);

Returns the indexed pixel value.

Also see:  PutDataNumber